package cn.bdqn.dao.course;

import cn.bdqn.pojo.course.Course;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Mapper
@Transactional(rollbackFor = {RuntimeException.class, Exception.class})
public interface CourseMapper extends BaseMapper<Course> {
    //根据课程标签id查询课程信息集合
    List<Course> selectCourseByTagId(@Param("ids") Integer[] tagIds);
    //根据课程id修改课程信息
    Integer updateCourseById(Course course);
    //根据课程名称和课程标签查询课程信息
    List<Course> selectCourseByNameAndTagAndStatusAndPage(@Param("courseName") String courseName,@Param("tagList")Integer[] tagList,@Param("courseStatus") Integer courseStatus);
    //获取所有在线课程id和名称
    List<Course> selectCourseIdAndName();
}
